#include<bits/stdc++.h>
using namespace std;
int main(){
	freopen("mht.in" , "r" , stdin);
	freopen("mht.out" , "w" , stdout);
	long long  x1 , x2 , y1 , y2 , s;
	cin >> x1 >> y1 >> x2 >> y2;
	s = abs(x1 - x2) + abs(y1 - y2);
	cout << s << endl;
	return 0;
}